package com.Homework2;

import java.util.HashMap;
import java.util.Set;

public class Test04 {
    public static void main(String[] args) {
        HashMap<Object, Object> map = new HashMap<>();
        map.put(1,"张三丰");
        map.put(2,"周芷若");
        map.put(3,"汪峰");
        map.put(4,"灭绝师太");
        Set<Object> objects = map.keySet();
        for (Object object : objects) {
            System.out.print(map.get(object)+" ");
        }
        map.put(5,"李晓红");
        map.remove(1);
        map.put(2,"周林");
        Set<Object> objects1 = map.keySet();
        for (Object object : objects1) {
            System.out.print(map.get(object)+" ");
        }
    }
}
